#include<bits/stdc++.h>
int main() {
  double pi=1;
  int i=0;
  double last;
  do{
    i+=1;
    last=1.0/(i*2+1);
    i%2 ? pi -= last: pi += last;
  }while(last>1e-6);
  printf("%.6lf\n", pi);
  printf("%.6lf\n", pi*4);
  return 0;
}
